<?

	//////////////////////////////FUNCION DETECTA SISTEMA OPERATIVO///////////////////
 
$OSList = array 
( 
// Match user agent string with operating systems 
'Windows 3.11' => 'Win16', 
'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)', 
'Windows 98' => '(Windows 98)|(Win98)', 
'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)', 
'Windows XP' => '(Windows NT 5.1)|(Windows XP)', 
'Windows Server 2003' => '(Windows NT 5.2)', 
'Windows Vista' => '(Windows NT 6.0)', 
'Windows 7' => '(Windows NT 7.0)', 
'Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)', 
'Windows ME' => 'Windows ME', 
'Open BSD' => 'OpenBSD', 
'Sun OS' => 'SunOS', 
'Linux' => '(Linux)|(X11)', 
'Mac OS' => '(Mac_PowerPC)|(Macintosh)', 
'QNX' => 'QNX', 
'BeOS' => 'BeOS', 
'OS/2' => 'OS/2', 
'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves/Teoma)|(ia_archiver)' 
); 
// Loop through the array of user agents and matching operating systems 
foreach($OSList as $CurrOS=>$Match) 
{ 
// Find a match 
if (eregi($Match, $_SERVER['HTTP_USER_AGENT'])) 
{ 
// We found the correct match 
break; 
} 
} 
//echo "tu  sistema operativo es ".$CurrOS; 

///////////////////////////////////////////////FIN/////////////////////////////////////////////////////
if ($CurrOS=='Linux')
{
 $cen_heig='426px';
 $size_heig='20px';
 $td_widt='75';
 
}else
{
 $cen_heig='440px';
 $size_heig='26px';
 $td_widt='90';

}
?>

<style type="text/css">

.texto1 {
	font-size: 11pt;
	font-family: Arial, Helvetica, sans-serif;
	color: #CCCCCC;
	font-weight:bold;
}

.estilo1 {
	font-size: 12pt;
	font-family: Arial, Helvetica, sans-serif;
	color: #CCCCCC;
	font-weight:bold;
}

.estilo2 {
	font-size: 11pt;
	font-family: Arial, Helvetica, sans-serif;
	color: #E02B2B;
	font-weight:bold;
}

.td1 {
	font-family: Arial, Helvetica, sans-serif;
	font-size:9pt;
	font-weight:bold;
	color:#CCCCCC;
	letter-spacing:1px;
}
.td2{
 	border-bottom:1px #C1C1C1 solid;
}

.cen {
	position: absolute;
	left: 30%;
	top: 40%;
	width: 608px;
	height: <? echo $cen_heig;?>;
	margin-top: -133px;
	margin-left: auto;
}
.usu{
background: url(../img/uid.png) no-repeat right;
background-color:#FFFFFF;
}
.cla{
background: url(../img/key.png) no-repeat right;
background-color:#FFFFFF;
}
</style>

 
<?php
if(isset($error_entrada) && $error_entrada==true){
?>
	

	
	
	<div id="panel_logins" class="cen">

<form name="data[Entrada]" action="/entrada" method="post">
<table width="500px" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
     <td id="tablog" bordercolor="#FFFFFF" height="311" align="center">
	 <table width="100%" height="100%" border="0" cellpadding="2" cellspacing="2" style="background-image:url(../img/login/tabla_login_2.png)">
	 <tr><td  width="200" colspan="3">&nbsp;</td>
	 </tr>
		<tr><td colspan="3" align="center"><span class="estilo2">DATOS INCORRECTOS</span></td></tr>
		<tr>
			
			<td align="center" height="30px"><?php echo $form->input('usuario', array('id'=>'usuario','label'=>false,'alt'=>'Usuario','class'=>'usu','size'=>$size_heig,'value'=>' ','onblur'=>'if(this.value==\'\')','onfocus'=>'if(this.value==\' \') this.value=\'\';'));?></td>
			
			<td align="left" rowspan="2"><img src="img/login/stop.png" width="90" height="80" /></td>
        </tr>
		<tr>
			<td align="center" height="30px"><?php echo $form->input('clave', array('type'=>'password','label'=>false, 'id'=>'clave','class'=>'cla','alt'=>'Contrasena','size'=>$size_heig,'value'=>'','onblur'=>'if(this.value==\'\')','onfocus'=>'if(this.value==\'\') this.value=\'\';'));?></td>
        </tr>
		<tr>
		    <td width="<? echo $td_widt;?>" align="center" class="texto1" colspan="2"><?php echo $msj; ?></td>
			</tr>
					
		<tr><td align="center" colspan="3" height="20px"><?php echo $form->submit('Ingresar al Sistema');?></td>
			</tr>
		<tr>
		<td align="right" class="texto1" colspan="3">&nbsp;</td>
		</tr>
</table>
	  </td></tr>
</table>
</form>

</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
<?php }else{ ?>
<div id="panel_logina" class="cen">

<form name="data[Entrada]" action="/entrada" method="post">
<table width="500px" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
     <td id="tablog" bordercolor="#FFFFFF" height="311" align="center">
	 <table width="100%" height="100%" border="0" cellpadding="2" cellspacing="2" style="background-image:url(../img/login/tabla_login.png)">
	 <tr><td  width="200" colspan="3">&nbsp;</td>
	 </tr>
		<tr><td colspan="3">&nbsp;</td></tr>
		<tr>
			
			<td align="center" height="30px"><?php echo $form->input('usuario', array('id'=>'usuario','label'=>false,'alt'=>'Usuario','class'=>'usu','size'=>$size_heig,'value'=>' ','onblur'=>'if(this.value==\'\')','onfocus'=>'if(this.value==\' \') this.value=\'\';'));?></td>
			
			<td align="left" rowspan="2"><img src="img/login/candado.png" width="90" height="80" /></td>
        </tr>
		<tr>
			<td align="center" height="30px"><?php echo $form->input('clave', array('type'=>'password','label'=>false, 'id'=>'clave','class'=>'cla','alt'=>'Contrasena','size'=>$size_heig,'value'=>'','onblur'=>'if(this.value==\'\')','onfocus'=>'if(this.value==\'\') this.value=\'\';'));?></td>
        </tr>
		<tr>
		    <td width="<? echo $td_widt;?>" align="left" class="texto1" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $msj; ?></td>
			</tr>
					
		<tr><td align="center" colspan="3" height="20px"><?php echo $form->submit('Ingresar al Sistema');?></td>
			</tr>
		<tr>
		<td align="right" class="texto1" colspan="3">&nbsp;</td>
		</tr>
</table>
	  </td></tr>
</table>
</form>

</div>

<?php } 

/*
<script type="text/javascript" language="javascript">
// <![CDATA[
new Effect.BlindDown("panel_login")
// ]]>
</script>
*/
?>